package com.example.floatingpopulation.controller;

import com.example.floatingpopulation.common.Result;
import com.example.floatingpopulation.service.impl.SimpleCodeManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class SimpleCodeController {
    @Autowired
    SimpleCodeManager scm;

    @PostMapping("/sendMail")
    public Result<String> sendMail(@RequestParam String email){
        scm.sendMail(email);
        return Result.success();
    }
}
